GtkAssistant: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Sun, 18 May 2014 04:02:59 +0000 (00:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 18 May 2014 15:43:13 +0000 (11:43 -0400)
The child properties in GtkAssistant are somewhat broken, since
they are not on direct children - but that is no reason to crash
if somebody does ask for child properties of direct children.

gtk/gtkassistant.c

index 4847a65f69b79cd65c8fade9bf1774fd430b6b45..5ad864877a800ad54efc5344c330b276159d2590 100644 (file)
@@ -1264,12 +1264,16 @@ gtk_assistant_get_child_property (GtkContainer *container,
                           gtk_assistant_get_page_title (assistant, child));
       break;
     case CHILD_PROP_PAGE_HEADER_IMAGE:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_value_set_object (value,
-                          ((GtkAssistantPage*) find_page (assistant, child))->header_image);
+                          gtk_assistant_get_page_header_image (assistant, child));
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case CHILD_PROP_PAGE_SIDEBAR_IMAGE:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_value_set_object (value,
-                          ((GtkAssistantPage*) find_page (assistant, child))->sidebar_image);
+                          gtk_assistant_get_page_side_image (assistant, child));
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     case CHILD_PROP_PAGE_COMPLETE:
       g_value_set_boolean (value,